@import '~@/styles/custom.scss';

@media (max-width: 1200px) {
  .hide-2000 {
    display: none !important;
  }
}

.list-view {
  flex: 1;
  display: flex;
  .list-view-main {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    background: #fff;
    outline: none;
  }
  .list-view-detail {
    width: 350px;
    background: #fff;
    position: relative;
    user-select: auto;
    box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14);
    border-left: 1px solid rgba(0, 0, 0, 0.12);
    .list-view-detail-header {
      padding-left: 10px;
      padding-right: 10px;
      .res-icon {
        margin-right: 0;
      }
      h4 {
        width: 275px;
        font-size: 16px;
        line-height: 39px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
    .separate-line-wrap {
      margin-right: -10px;
      margin-left: -10px;
    }
    .list-view-detail-close {
      cursor: pointer;
      opacity: 0.5;
      position: absolute;
      height: 14px;
      right: 14px;
      top: 8px;
      width: 14px;
    }
    .list-view-detail-content {
      padding: 10px;
      height: calc(100% - 40px);
      overflow: auto;
      overflow-x: hidden;

      .image-preview {
        height: 216px;
        display: flex;
        align-items: center;
        justify-content: center;
        img {
          max-height: 200px;
          max-width: 320px;
          min-width: 80px;
          min-height: 80px;
        }
      }

      .list-view-detail-content-item {
        margin-bottom: 5px;
        .list-view-detail-content-item-label {
          color: rgba(0, 0, 0, 0.6);
          font-size: 12px;
        }
        .list-view-detail-content-item-value {
          font-size: 14px;
          color: rgba(0, 0, 0, 1);
          word-break: break-all;
          &.head-request-info {
            color: rgba(0, 0, 0, 0.8);
            padding-left: 5px;
            font-size: 12px;
            line-height: 20px;
          }
        }
      }
    }
  }
}

.separate-line {
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.list-operation {
  height: 40px;
  display: flex;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  align-items: center;
  // padding-left: 4px;
  .list-operation-item {
    color: rgba(0, 0, 0, 0.88);
    min-width: 22px;
    font-size: 14px;
    line-height: 24px;
    padding: 8px;
    margin-right: 8px;
    &:hover:not(.disabled) {
      cursor: pointer;
      background-color: #edf4fc;
    }
    &.list-operation-item-hover {
      cursor: pointer;
      background-color: #edf4fc;
    }
    &.disabled {
      color: rgba(0, 0, 0, 0.2);
      .svg-icon {
        opacity: 0.2;
      }
    }
    .svg-icon {
      margin-right: 3px;
      color: $upyunPrimaryColor;
    }
  }
}

.list {
  display: flex;
  flex: 1;
  overflow-y: scroll;
  overflow-x: hidden;
}

.empty-list {
  display: flex;
  align-items: center;
  flex: 1;
  .empty-list-content {
    text-align: center;
    flex: 1;
    font-size: 22px;
  }
}

.files-list {
  cursor: default;

  display: table;
  table-layout: fixed;
  padding-top: 25px;
  height: 100%;
  width: 100%;

  .files-list-header {
    background: #FAFAFA;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
    position: absolute;
    color: #4c607a;
    font-size: 14px;
    display: flex;
    top: 40px;
    width: calc(100% - 16px);
    .column-file-name {
      flex: 1;
    }
    .file-info-item,.file-info-header {
      padding-top: 0;
      padding-bottom: 0;
      line-height: 25px;
      padding-left: 6px;
      &:first-child {
        padding-left: 12px;
      }
      &:not(:last-child) {
        border-right: 1px solid rgba(0, 0, 0, 0.08);
      }
    }

    .file-info-header {
      &:hover {
        color: rgba(0, 0, 0, 1);
      }
      .svg-icon {
        display: none;
        &.is-active {
          display: inline;
        }
      }
    }
  }

  .files-list-body {
    color: rgba(0, 0, 0, 1);
    display: table-row-group;
  }

  .files-list-column {
    display: table-column-group;
  }

  .table-column {
    display: table-column;
  }

  .column-file-name {
    width: 100%;
  }
  .column-last-modified {
    width: 170px;
  }
  .column-file-type {
    width: 150px;
  }
  .column-file-size {
    width: 120px;
  }

  .files-list-item {
    display: table-row;
    outline: none;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    &:hover {
      background: #edf4fc;
    }
    &.item-selected {
      background: #cce8ff;
    }
  }

  .file-info-item {
    padding: 5px 6px 5px 10px;
    line-height: 24px;
    display: table-cell;
    &:first-child {
      padding-left: 12px;
    }
  }

  .mime,
  .last-modified,
  .size {
    color: rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .size {
    padding-right: 30px;
    text-align: right;
  }
}

.item-hover {
  background: #e5f3ff;
}

.empty-list-table {
  width: 100%;
  .empty-list-row {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
    display: flex;
    min-height: 56px;
  }
  .empty-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}
